<div class="change">
  <p>
  <% if change.is_a? IssueRefChange -%>
    <%= change.changed_to_type.to_s %>
    changed <%= 'from "' + change.from.name + '"' unless change.from.nil? or change.from.name.empty? %>
    <%= 'to "' + change.to.name + '"' unless change.to.nil? or change.to.name.empty?%>
  <% elsif change.is_a? IssueAttrChange and change.attr =~ /tags/i -%>
    Tags added: <%= change.to unless change.to.nil? or change.to.empty? %>
  <% else -%>
    <%= change.attr.capitalize %> changed
    <%
      from = truncate( change.from, 50 ) if change.from
      to = truncate( change.to, 50 ) if change.to
    -%>
    <%= 'from "' + from + '"' unless from.empty? %>
    <%= 'to "' + to + '"' unless to.empty?%>
  <% end -%>
  </p>
</div>
